package com.dhnsoft.shortLink.project.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dhnsoft.shortLink.project.dao.entity.LinkAccessLogsDO;
import com.dhnsoft.shortLink.project.dao.entity.LinkAccessStatsDO;
import com.dhnsoft.shortLink.project.dto.req.ShortLinkStatsReqDTO;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
 * ClassName: LinkAccessLogsMapper
 * Package: com.dhnsoft.shortLink.project.dao.mapper
 * Description:访问日志监控持久层
 *
 * @Author dhn
 * @Create 2024/4/7 10:54
 * @Version 1.0
 */
public interface LinkAccessLogsMapper extends BaseMapper<LinkAccessLogsDO> {


    /**
     * 根据短链接获取指定日期内PV、UV、UIP数据
     * */
    LinkAccessStatsDO findPvUvUidStatsByShortLink(@Param("param") ShortLinkStatsReqDTO requestParam);

    List<HashMap<String, Object>> listTopIpByShortLink(@Param("param")ShortLinkStatsReqDTO requestParam);

    HashMap<String, Object> findUvTypeCntByShortLink(@Param("param") ShortLinkStatsReqDTO requestParam);
}
